(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
i(0) → 0
+(0, y) → y
+(x, 0) → x
i(i(x)) → x
+(i(x), x) → 0
+(x, i(x)) → 0
i(+(x, y)) → +(i(x), i(y))
+(x, +(y, z)) → +(+(x, y), z)
+(+(x, i(y)), y) → x
+(+(x, y), i(y)) → x
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted CpxTRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
i(0) → 0
i(i(z0)) → z0
i(+(z0, z1)) → +(i(z0), i(z1))
+(0, z0) → z0
+(z0, 0) → z0
+(i(z0), z0) → 0
+(z0, i(z0)) → 0
+(z0, +(z1, z2)) → +(+(z0, z1), z2)
+(+(z0, i(z1)), z1) → z0
+(+(z0, z1), i(z1)) → z0
Tuples:
I(+(z0, z1)) → c2(+'(i(z0), i(z1)), I(z0), I(z1))
+'(z0, +(z1, z2)) → c7(+'(+(z0, z1), z2), +'(z0, z1))
S tuples:
I(+(z0, z1)) → c2(+'(i(z0), i(z1)), I(z0), I(z1))
+'(z0, +(z1, z2)) → c7(+'(+(z0, z1), z2), +'(z0, z1))
K tuples:none
Defined Rule Symbols:
i, +
Defined Pair Symbols:
I, +'
Compound Symbols:
c2, c7
(3) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
I(+(z0, z1)) → c2(+'(i(z0), i(z1)), I(z0), I(z1))
We considered the (Usable) Rules:
+(0, z0) → z0
+(i(z0), z0) → 0
+(z0, i(z0)) → 0
+(z0, +(z1, z2)) → +(+(z0, z1), z2)
+(+(z0, i(z1)), z1) → z0
+(+(z0, z1), i(z1)) → z0
+(z0, 0) → z0
i(i(z0)) → z0
i(+(z0, z1)) → +(i(z0), i(z1))
And the Tuples:
I(+(z0, z1)) → c2(+'(i(z0), i(z1)), I(z0), I(z1))
+'(z0, +(z1, z2)) → c7(+'(+(z0, z1), z2), +'(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(+(x1, x2)) = [3] + [4]x1 + [3]x2
POL(+'(x1, x2)) = 0
POL(0) = [5]
POL(I(x1)) = [5] + [2]x1
POL(c2(x1, x2, x3)) = x1 + x2 + x3
POL(c7(x1, x2)) = x1 + x2
POL(i(x1)) = [4] + [5]x1
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
i(0) → 0
i(i(z0)) → z0
i(+(z0, z1)) → +(i(z0), i(z1))
+(0, z0) → z0
+(z0, 0) → z0
+(i(z0), z0) → 0
+(z0, i(z0)) → 0
+(z0, +(z1, z2)) → +(+(z0, z1), z2)
+(+(z0, i(z1)), z1) → z0
+(+(z0, z1), i(z1)) → z0
Tuples:
I(+(z0, z1)) → c2(+'(i(z0), i(z1)), I(z0), I(z1))
+'(z0, +(z1, z2)) → c7(+'(+(z0, z1), z2), +'(z0, z1))
S tuples:
+'(z0, +(z1, z2)) → c7(+'(+(z0, z1), z2), +'(z0, z1))
K tuples:
I(+(z0, z1)) → c2(+'(i(z0), i(z1)), I(z0), I(z1))
Defined Rule Symbols:
i, +
Defined Pair Symbols:
I, +'
Compound Symbols:
c2, c7
(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
+'(z0, +(z1, z2)) → c7(+'(+(z0, z1), z2), +'(z0, z1))
We considered the (Usable) Rules:
+(0, z0) → z0
+(i(z0), z0) → 0
+(z0, i(z0)) → 0
+(z0, +(z1, z2)) → +(+(z0, z1), z2)
+(+(z0, i(z1)), z1) → z0
+(+(z0, z1), i(z1)) → z0
+(z0, 0) → z0
i(i(z0)) → z0
i(+(z0, z1)) → +(i(z0), i(z1))
And the Tuples:
I(+(z0, z1)) → c2(+'(i(z0), i(z1)), I(z0), I(z1))
+'(z0, +(z1, z2)) → c7(+'(+(z0, z1), z2), +'(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(+(x1, x2)) = [2] + [2]x1 + [3]x2
POL(+'(x1, x2)) = [4]x2
POL(0) = [2]
POL(I(x1)) = [4] + [2]x1
POL(c2(x1, x2, x3)) = x1 + x2 + x3
POL(c7(x1, x2)) = x1 + x2
POL(i(x1)) = x1
(6) Obligation:
Complexity Dependency Tuples Problem
Rules:
i(0) → 0
i(i(z0)) → z0
i(+(z0, z1)) → +(i(z0), i(z1))
+(0, z0) → z0
+(z0, 0) → z0
+(i(z0), z0) → 0
+(z0, i(z0)) → 0
+(z0, +(z1, z2)) → +(+(z0, z1), z2)
+(+(z0, i(z1)), z1) → z0
+(+(z0, z1), i(z1)) → z0
Tuples:
I(+(z0, z1)) → c2(+'(i(z0), i(z1)), I(z0), I(z1))
+'(z0, +(z1, z2)) → c7(+'(+(z0, z1), z2), +'(z0, z1))
S tuples:none
K tuples:
I(+(z0, z1)) → c2(+'(i(z0), i(z1)), I(z0), I(z1))
+'(z0, +(z1, z2)) → c7(+'(+(z0, z1), z2), +'(z0, z1))
Defined Rule Symbols:
i, +
Defined Pair Symbols:
I, +'
Compound Symbols:
c2, c7
(7) SIsEmptyProof (EQUIVALENT transformation)
The set S is empty
(8) BOUNDS(O(1), O(1))